Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeViz: Allow setting ratio btw attractive and repulsive forces #6515

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

janezd
Copy link
Contributor

@janezd janezd commented Jul 19, 2023

Issue

Fixes #6479.

Description of changes

Adds an option to control the strength of attractive and repulsive forces.

Includes
  • Code changes
  • Tests
  • Documentation

@codecov
Copy link

codecov bot commented Jul 25, 2023

Codecov Report

Merging #6515 (1947679) into master (ca5bac8) will increase coverage by 0.07%.
Report is 34 commits behind head on master.
The diff coverage is 71.42%.

❗ Current head 1947679 differs from pull request most recent head 8bb82de. Consider uploading reports for the commit 8bb82de to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6515      +/-   ##
==========================================
+ Coverage   87.69%   87.77%   +0.07%     
==========================================
  Files         321      321              
  Lines       69420    69451      +31     
==========================================
+ Hits        60878    60959      +81     
+ Misses       8542     8492      -50     
📢 Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=biolab).

@janezd janezd marked this pull request as ready for review July 25, 2023 09:04
@processo
Copy link

Just wanted to add that with this new code changing Initialization while Gravity checked either does nothing or gives the error:

line 293, in init_projection
  gravity=self.gravity if self.balance else None
AttributeError: 'OWFreeViz' object has no attribute 'gravity'

@VesnaT
Copy link
Contributor

VesnaT commented Aug 25, 2023

Iris -> Freeviz -> Start -> Check Gravity -> select Random Initialization

-------------------------- AttributeError Exception ---------------------------
Traceback (most recent call last):
  File "/Users/vesna/orange-widget-base/orangewidget/gui.py", line 2261, in __call__
    self.func(**kwds)
  File "/Users/vesna/orange3/Orange/widgets/visualize/owfreeviz.py", line 231, in __init_combo_changed
    self.init_projection()
  File "/Users/vesna/orange3/Orange/widgets/visualize/owfreeviz.py", line 293, in init_projection
    gravity=self.gravity if self.balance else None)
AttributeError: 'OWFreeViz' object has no attribute 'gravity'
-------------------------------------------------------------------------------

Copy link
Contributor

@VesnaT VesnaT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding some tests for the new code would be nice.
Also, lint does not pass.

Orange/widgets/visualize/owfreeviz.py Show resolved Hide resolved
@VesnaT VesnaT merged commit 484becf into biolab:master Sep 12, 2023
16 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bringing back more control in FreeViz
3 participants